package system

import "MoSkeleton/framework/utils"

type MetaResp struct {
	// Title sets the name displayed in the sidebar and breadcrumbs.
	Title string ` json:"title"`
	// Icon sets the icon of the route, corresponding to the path src/assets/icons/svg.
	Icon string ` json:"icon"`
	// NoCache, if set to true, will not be cached by <keep-alive>.
	NoCache bool ` json:"noCache"`
	// Link is an internal link (starts with http(s)://).
	Link string ` json:"link"`
}

func (s *MetaResp) SetLink(link string) {
	if utils.IsHttp(link) {
		s.Link = link
	}
}
